{% extends "layouts/base.html" %}

{% block title %} 增加子工序 {% endblock %}

<!-- Specific CSS goes HERE -->
{% block stylesheets %}{% endblock stylesheets %}

{% block content %}

    <!-- [ Main Content ] start -->
    <section class = "pcoded-main-container">
        <div class = "pcoded-content">
            <!-- [ breadcrumb ] start -->
            <div class = "page-header">
                <div class = "page-block">
                    <div class = "row align-items-center">
                        <div class = "col-md-12">
                            <div class = "page-header-title">
                                <h5 class = "m-b-10">增加子工序</h5>
                            </div>
                            <ul class = "breadcrumb">
                                <li class = "breadcrumb-item"><a href = "{% url 'index' %}"><i
                                        class = "feather icon-home"></i></a></li>
                                <li class = "breadcrumb-item"><a href = "#!">基础数据</a></li>
                                <li class = "breadcrumb-item"><a href = "#!">工序表</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!-- [ breadcrumb ] end -->
            <!-- [ Main Content ] start -->
            <div class = "row">

                <!-- [ stiped-table ] start -->
                <div class = "col-sm-12">

                    <div class = "card">
                        <div class = "card-header text-center">
                            <h4>增加新的子工序</h4>

                        </div>
                        <div class = "card-body">
                            <div class = "row">
                                <div class = "col-sm-3"></div>
                                <div class = "col-sm-6">

                                    <form class = "form-inline" action = "{% url 'add_supprocess' process_id %}"
                                          method = "post" data-bitwarden-watching = "1">
                                        {% csrf_token %}
                                        <div class = "input-group mb-3">
                                            <input type = "text" class = "form-control"
                                                   placeholder = "子工序名称" name="s_pName">
                                            <div class = "input-group-append">
                                                <button class = "btn  btn-primary" type = "submit">提交</button>
                                            </div>
                                        </div>
                                    </form>


                                </div>
                                <div class = "col-sm-3"></div>
                            </div>


                            <script>
                                // Example starter JavaScript for disabling form submissions if there are invalid fields
                                (function () {
                                    'use strict';
                                    window.addEventListener('load', function () {
                                        // Fetch all the forms we want to apply custom Bootstrap validation styles to
                                        var forms = document.getElementsByClassName('needs-validation');
                                        // Loop over them and prevent submission
                                        var validation = Array.prototype.filter.call(forms, function (form) {
                                            form.addEventListener('submit', function (event) {
                                                if (form.checkValidity() === false) {
                                                    event.preventDefault();
                                                    event.stopPropagation();
                                                }
                                                form.classList.add('was-validated');
                                            }, false);
                                        });
                                    }, false);
                                })();
                            </script>


                        </div>


                    </div>
                </div>
                <!-- [ stiped-table ] end -->

            </div>
            <!-- [ Main Content ] end -->
        </div>
    </section>
    <!-- [ Main Content ] end -->

{% endblock content %}

<!-- Specific Page JS goes HERE  -->
{% block javascripts %}{% endblock javascripts %}
